<template>
<!--  <div id="app">-->
  <div id="app" :class="{'big-screen-background' :isBigScreen, 'default-background': !isBigScreen}">
    <GlobalAlert />
    <router-view />
    <theme-picker />
  </div>
</template>

<script>
import ThemePicker from "@/components/ThemePicker";
import GlobalAlert from '@/components/GlobalAlert';
import { getBasicMessage } from "@/api/menu"

export default {
  name: "App",
  components: { ThemePicker,GlobalAlert },
  data() {
    return {
      isBigScreen: false
    }
  },
  mounted() {
    getBasicMessage()
  },
  watch: {
    '$route'(to) {
      this.isBigScreen = to.path === '/bigScreen';
    }
  },
  metaInfo() {
    return {
      title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
      titleTemplate: title => {
        return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE
      }
    }
  }
};
</script>
<style scoped>
#app.big-screen-background {
  background-color: rgb(2,23,53);
}

#app.default-background {
  background-color: white;
}

#app .theme-picker {
  display: none;
}
/*弹窗打开关闭时关闭默认的过渡动画效果*/
.dialog-fade-enter-active {
  animation: none !important;
}
.dialog-fade-leave-active {
  animation: none !important;
}
</style>
